Optimal. Leaf size=40 \[ -\frac{\csc ^3(x)}{3}-\frac{1}{8} i \tanh ^{-1}(\cos (x))+\frac{1}{4} i \cot (x) \csc ^3(x)-\frac{1}{8} i \cot (x) \csc (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.150726, antiderivative size = 40, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 8, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.615, Rules used = {3518, 3108, 3107, 2606, 30, 2611, 3768, 3770} \[ -\frac{\csc ^3(x)}{3}-\frac{1}{8} i \tanh ^{-1}(\cos (x))+\frac{1}{4} i \cot (x) \csc ^3(x)-\frac{1}{8} i \cot (x) \csc (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3518
Rule 3108
Rule 3107
Rule 2606
Rule 30
Rule 2611
Rule 3768
Rule 3770
Rubi steps
\begin{align*} \int \frac{\csc ^5(x)}{i+\tan (x)} \, dx &=\int \frac{\cot (x) \csc ^4(x)}{i \cos (x)+\sin (x)} \, dx\\ &=-\left (i \int \cot (x) \csc ^4(x) (\cos (x)+i \sin (x)) \, dx\right )\\ &=-\left (i \int \left (i \cot (x) \csc ^3(x)+\cot ^2(x) \csc ^3(x)\right ) \, dx\right )\\ &=-\left (i \int \cot ^2(x) \csc ^3(x) \, dx\right )+\int \cot (x) \csc ^3(x) \, dx\\ &=\frac{1}{4} i \cot (x) \csc ^3(x)+\frac{1}{4} i \int \csc ^3(x) \, dx-\operatorname{Subst}\left (\int x^2 \, dx,x,\csc (x)\right )\\ &=-\frac{1}{8} i \cot (x) \csc (x)-\frac{\csc ^3(x)}{3}+\frac{1}{4} i \cot (x) \csc ^3(x)+\frac{1}{8} i \int \csc (x) \, dx\\ &=-\frac{1}{8} i \tanh ^{-1}(\cos (x))-\frac{1}{8} i \cot (x) \csc (x)-\frac{\csc ^3(x)}{3}+\frac{1}{4} i \cot (x) \csc ^3(x)\\ \end{align*}
Mathematica [B] time = 0.0233137, size = 139, normalized size = 3.48 \[ -\frac{1}{12} \tan \left (\frac{x}{2}\right )-\frac{1}{12} \cot \left (\frac{x}{2}\right )+\frac{1}{64} i \csc ^4\left (\frac{x}{2}\right )-\frac{1}{32} i \csc ^2\left (\frac{x}{2}\right )-\frac{1}{64} i \sec ^4\left (\frac{x}{2}\right )+\frac{1}{32} i \sec ^2\left (\frac{x}{2}\right )+\frac{1}{8} i \log \left (\sin \left (\frac{x}{2}\right )\right )-\frac{1}{8} i \log \left (\cos \left (\frac{x}{2}\right )\right )-\frac{1}{24} \cot \left (\frac{x}{2}\right ) \csc ^2\left (\frac{x}{2}\right )-\frac{1}{24} \tan \left (\frac{x}{2}\right ) \sec ^2\left (\frac{x}{2}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.043, size = 58, normalized size = 1.5 \begin{align*} -{\frac{1}{8}\tan \left ({\frac{x}{2}} \right ) }-{\frac{i}{64}} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{4}-{\frac{1}{24} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{3}}+{{\frac{i}{64}} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{-4}}-{\frac{1}{8} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{-1}}-{\frac{1}{24} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{-3}}+{\frac{i}{8}}\ln \left ( \tan \left ({\frac{x}{2}} \right ) \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.30085, size = 112, normalized size = 2.8 \begin{align*} -\frac{{\left (\frac{8 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac{24 \, \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} - 3 i\right )}{\left (\cos \left (x\right ) + 1\right )}^{4}}{192 \, \sin \left (x\right )^{4}} - \frac{\sin \left (x\right )}{8 \,{\left (\cos \left (x\right ) + 1\right )}} - \frac{\sin \left (x\right )^{3}}{24 \,{\left (\cos \left (x\right ) + 1\right )}^{3}} - \frac{i \, \sin \left (x\right )^{4}}{64 \,{\left (\cos \left (x\right ) + 1\right )}^{4}} + \frac{1}{8} i \, \log \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.13878, size = 424, normalized size = 10.6 \begin{align*} \frac{{\left (-3 i \, e^{\left (8 i \, x\right )} + 12 i \, e^{\left (6 i \, x\right )} - 18 i \, e^{\left (4 i \, x\right )} + 12 i \, e^{\left (2 i \, x\right )} - 3 i\right )} \log \left (e^{\left (i \, x\right )} + 1\right ) +{\left (3 i \, e^{\left (8 i \, x\right )} - 12 i \, e^{\left (6 i \, x\right )} + 18 i \, e^{\left (4 i \, x\right )} - 12 i \, e^{\left (2 i \, x\right )} + 3 i\right )} \log \left (e^{\left (i \, x\right )} - 1\right ) + 6 i \, e^{\left (7 i \, x\right )} + 106 i \, e^{\left (5 i \, x\right )} - 22 i \, e^{\left (3 i \, x\right )} + 6 i \, e^{\left (i \, x\right )}}{24 \,{\left (e^{\left (8 i \, x\right )} - 4 \, e^{\left (6 i \, x\right )} + 6 \, e^{\left (4 i \, x\right )} - 4 \, e^{\left (2 i \, x\right )} + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.40169, size = 85, normalized size = 2.12 \begin{align*} -\frac{1}{64} i \, \tan \left (\frac{1}{2} \, x\right )^{4} - \frac{1}{24} \, \tan \left (\frac{1}{2} \, x\right )^{3} - \frac{50 i \, \tan \left (\frac{1}{2} \, x\right )^{4} + 24 \, \tan \left (\frac{1}{2} \, x\right )^{3} + 8 \, \tan \left (\frac{1}{2} \, x\right ) - 3 i}{192 \, \tan \left (\frac{1}{2} \, x\right )^{4}} + \frac{1}{8} i \, \log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) \right |}\right ) - \frac{1}{8} \, \tan \left (\frac{1}{2} \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]